﻿namespace Probel.Statistics.Helpers
{
    using System.Security.Cryptography;
    using System.Text;

    public static class StringExtensions
    {
        #region Methods

        public static string GetHash(this string inputString)
        {
            HashAlgorithm algorithm = MD5.Create();  //or use SHA1.Create();
            var bytes= algorithm.ComputeHash(Encoding.UTF8.GetBytes(inputString));
            return Encoding.Default.GetString(bytes);
        }

        #endregion Methods
    }
}